package com.doge;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;

public class Launch extends JFrame{
	
	String[] args;
	public static void main(String[] args) {
		Launch l = new Launch();
		l.setVisible(true);
		l.args = args;
	}
	
	public Launch()
	{
		super("Doge");
		this.setSize(600,200);
		
		final String[] args_ = args;

		JPanel main = new JPanel();
		JButton gameButton = new JButton("Game");
		JButton editorButton = new JButton("Editor");
		main.add(gameButton);
		main.add(editorButton);
		

		this.add(main);
		
		final Launch l = this;
		gameButton.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e)
			{
				StartGame game = new StartGame();
				game.main(args_);
				l.setVisible(false);
			}
		});
		
		editorButton.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e)
			{
				Editor game = new Editor();
				game.main(args_);
				l.setVisible(false);
			}
		});
		
	}
}
